﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bakopanos.ArchiCop;
using QuickGraph;

namespace SampleConsole
{
    class Program
    {
        static void Main(string[] args)
        {

            var edges = DataImport.ImportXml("assemblies.xml");

            edges.ExportDgml("sample1.dgml");

            edges = edges.IncludeMatchSourceAndTarget("Microsoft.Practices");
            edges = edges.ConvertEdges("Microsoft.Practices.EnterpriseLibrary", "Microsoft.Practices.EnterpriseLibrary");
            edges = edges.ConvertEdges("Microsoft.Practices.Unity", "Microsoft.Practices.Unity");
            edges = edges.ExcludeSelfEdges().GetDistinctEdges();

            edges.ExportDgml("sample2.dgml");


            //var edges = new List<IEdge<string>>
            //{
            //    new Edge<string>("Presentation", "Business"),
            //    new Edge<string>("Business", "Data Access"),
            //    new Edge<string>("Presentation", "Common.UI"),
            //    new Edge<string>("Business", "Common"),
            //    new Edge<string>("Data Access", "Common.Data")
            //};

            //edges.ExportDgml("sample1.dgml");

            //edges = edges.ConvertEdges("Presentation", "UI")
            //    .ConvertEdges("Business", "Biz")
            //    .ConvertEdges("Data Access", "Data").
            //    ConvertEdges("Common", "Common").ToList();

            //edges.ExportDgml("sample2.dgml");

            //edges = edges.ExcludeMatchSourceOrTarget("Common").ToList();

            //edges.ExportDgml("sample3.dgml");
        }
    }
}
